#include "main.h"
int main(){
	Beep_Init();
	Usartx_Init(USART1,115200,72);
	ADC_Init();
	OLED_Init();
	Beep=1;
	Delay_ms(50);
	Beep=0;
	uint16_t X=0, Y=0;
	uint8_t SW=0;
		OLED_ClearGram();
		OLED_Printf(1,1,8,16,"X=%d ",100);
		OLED_Printf(1,20,8,16,"Y=%d ",200);
//		OLED_Printf(1,40,8,16,"SW=%d ",SW);
		OLED_Refresh();
	while(1){
		X = HW504_R_X();
		SW = HW504_R_SW();
		Y = HW504_R_Y();
		OLED_ClearGram();
		OLED_Printf(1,1,8,16,"X=%d ",X);
		OLED_Printf(1,20,8,16,"Y=%d ",Y);
		OLED_Printf(1,40,8,16,"SW=%d ",SW);
		OLED_Refresh();

		Delay_ms(100);
	}
}
